import { View } from "../../../mvc/core/View";
import { LayerManager } from "../../manager/LayerManager";
import { ObjCreate } from "../common/ObjCreate";
import { ResFileConst } from "../../resource/ResFileConst";
import { Dispatcher } from "../../../mvc/core/Dispatcher";
import { DataEvent } from "../../events/DataEvent";
import { EventName } from "../../mvc/EventName";
import { GLoadedButton } from "../../../../com/mui/controls/GLoadedButton";
//class ArenaCrossAdIconView
    
    export  class ArenaCrossAdIconView extends View
    {
        constructor()
        {
            super();
            this.layer = LayerManager.rightTopUILayer;
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            this._btnArenaCrossAd = ObjCreate.createGLoadedButton(ResFileConst.KingWarAdHintBtn, 0, 0, 60, 50, this);
            this._btnArenaCrossAd.addEventListener(flash.events.MouseEvent.CLICK, this.onArenaCrossAdClick);
            return;
        }

        /* internal  */onArenaCrossAdClick(arg1: Object /* flash.events.MouseEvent */): void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.ShowKingWarModule));
            return;
        }

        /* internal */ /* var */_btnArenaCrossAd: GLoadedButton;
    }
